package com.sys.listener;

import com.sys.service.SysCrontabService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class QuartzRunner implements CommandLineRunner {
    @Autowired
    private SysCrontabService sysCrontabService;

    @Override
    public void run(String... args) throws Exception {
        sysCrontabService.startQuartzJobAll(); // 启动所有定时器
    }

}
